Creating and Disposing of Color Tables
You use a color table, which is defined by a data structure of typeColorTable
, to specify colors in the form ofRGBColor
records. You can create and store color tables in'clut'
resources. To retrieve a color table stored in a'clut'
resource, you can use theGetCTable
function. To dispose of the handle allocated for a color table, you use theDisposeCTable
procedure.The Palette Manager, described in the chapter "Palette Manager" in Inside Macintosh: Advanced Color Imaging, has additional routines that enable you to copy colors between palettes and color tables and to restore the default colors to a CLUT belonging to a graphics device.
The Color Manager, described in the chapter "Color Manager" in Inside Macintosh: Advanced Color Imaging, contains low-level routines for directly manipulating the fields of the CLUT on a graphics device; most applications do not need to use those routines.
Subtopics
- GetCTable
- DisposeCTable